/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package photoshare.services;

import java.sql.SQLException;
import java.util.ArrayList;
import photoshare.dao.RoleDAO;
import photoshare.dto.RoleDTO;

/**
 *
 * @author PhotoShare
 */
public class RoleService {

    public RoleService() {
    }

    public boolean create(RoleDTO roleDTO) throws SQLException {
        return new RoleDAO().create(roleDTO);
    }

    public ArrayList<RoleDTO> findAll() {
        return new RoleDAO().readAll();
    }

    public RoleDTO readById(Integer roleId) {
        return new RoleDAO().readById(roleId);
    }

    public boolean updateById(RoleDTO roleDTO, Integer roleId) throws SQLException {
        return new RoleDAO().updateById(roleDTO, roleId);
    }

    public boolean deleteById(Integer roleId) throws SQLException {
        return new RoleDAO().deleteById(roleId);
    }
}
